
	private ["_spawned","_zombie","_horde","_zombietype","_object","_group","_spawn_number","_class","_locType"];
	_object = _this select 0;
	_locType = _this select 1;
	_zcount = _this select 2;
	
//some changes by Spam_One, for a more random spawn, trying to create kind of waves of zombies coming from far (modify zombiegenerator.fsm also)

	if (isNil "_Zcount") then {
	
				_spawn_number = (round(random 2 * (random 3)));
	
	} else {
	
	_spawn_number = _zcount};
    _spawned = 0;

    while {_spawned < _spawn_number} do {
		_group = createGroup east;
		_class = call CLY_randomzombie;
		_zombietype = "normal";
		//Change radius for random placement at zombies spawns i think (by Spam_One)
		_zombie= _group createUnit [_class,getPos zombiespawner,[],100,"NONE"];
		if (gameType == 1) then {
			spawned_Zombies = spawned_Zombies + [_zombie];
		};
		_zombie enableSimulation false;
		if (CVG_horde == 1) then {_horde = false} else {_horde = true};

		
		//Initialize zombification
		
		//more randomness again on the getPos for Object and Array // by Spam_One -----------------------
		if (_locType == "Object") then {
        [_zombie,_zombietype,objNull,_horde,0,[(getposATL _object select 0) + (random 70),(getposATL _object select 1) + (random 70),0]] exec "zombie_scripts\cly_z_init.sqs";
		};
		if (_locType == "Array") then {
		[_zombie,_zombietype,objNull,_horde,0,[(_object select 0) + (random 70),(_object select 1) + (random 25),0]] exec "zombie_scripts\cly_z_init.sqs";
		};
        _spawned = _spawned + 1;
		diag_log format ["Zombie %1 spawned at %2",_zombie,_object];
    };

